﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CCWin;
namespace weiqijiance.工位配置
{
    public partial class DLXsetting : CCSkinMain
    {
        public DLXsetting()
        {
            InitializeComponent();
        }
        控制流程.flowcrtl flowbass = new 控制流程.flowcrtl();

        private void DLXsetting_Load(object sender, EventArgs e)
        {
            iniclass objini = new iniclass();
            string path = "";
            path = System.Windows.Forms.Application.StartupPath + path + "\\安综检仪表配置.ini";
            string path1 = string.Format(@"{0}", path);
            objini.Ini(path1);
            textBox1.Text = objini.ReadValue("动力性", "起始码值").Trim();
            textBox2.Text = objini.ReadValue("动力性", "低点码值自增").Trim();
            textBox3.Text = objini.ReadValue("动力性", "高点码值自增").Trim();
            comboBox1.Text = objini.ReadValue("动力性", "滚筒").Trim();
            textBox5.Text = objini.ReadValue("动力性", "信息显示时间").Trim();

        }

        private void button1_Click(object sender, EventArgs e)
        {
            iniclass objini = new iniclass();
            string path = "";
            path = System.Windows.Forms.Application.StartupPath + path + "\\安综检仪表配置.ini";
            string path1 = string.Format(@"{0}", path);
            objini.Ini(path1);
            objini.Writue("动力性", "起始码值", textBox1.Text);
            objini.Writue("动力性", "低点码值自增", textBox2.Text);
            objini.Writue("动力性", "高点码值自增", textBox3.Text);
            objini.Writue("动力性", "滚筒", comboBox1.Text);
            objini.Writue("动力性", "信息显示时间", textBox5.Text);
            MessageBox.Show("完成");
            基类窗体.UploadAndDownload fupload = new 基类窗体.UploadAndDownload();
            objini.Ini(System.Windows.Forms.Application.StartupPath + "\\系统信息.ini");
            string sjcxname = objini.ReadValue("系统信息", "检测线名称");
            string sgongweiname = objini.ReadValue("系统信息", "检测工位名称");
            fupload.upload(sjcxname, sgongweiname, "安综检仪表配置.ini");
        }
    }
}
